package com.gzx.plugin.tjzy.modular.sms.reply.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gzx.plugin.tjzy.modular.sms.reply.bo.GzxSmsReplyQueryBo;
import com.gzx.plugin.tjzy.modular.sms.reply.service.GzxSmsReplyService;
import com.gzx.plugin.tjzy.modular.sms.reply.vo.GzxSmsReplyVo;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.pojo.CommonResult;

/**
 * @author zjt
 * @description
 * @date 2025/7/25 17:32
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/tjzy/sms/reply")
public class GzxSmsReplyController {

    private final GzxSmsReplyService smsReplyService;

    @PostMapping("/pageList")
    public CommonResult<Page<GzxSmsReplyVo>> pageList(@RequestBody GzxSmsReplyQueryBo smsReplyQueryBo) {
        return CommonResult.data(smsReplyService.pageList(smsReplyQueryBo));
    }

    @PostMapping("/export")
    public void export(@RequestBody GzxSmsReplyQueryBo smsReplyQueryBo, HttpServletResponse httpServletResponse) {
        smsReplyService.export(smsReplyQueryBo, httpServletResponse);
    }
}
